def step(list1, list2, list3):
    """
    拼接步骤
    :param list1: 原来步骤
    :param list2: 需要处理的步骤
    :param list3: 正确用例步骤
    :return:
    """
    result = []
    for i in range(0, len(list1)):
        if (list2[i] in list1 and list3[i] in list1) or list2[i] not in list1:
            result.append(list2[i])
        else:
            result.append(list3[i])
    return result


def common_type_merge_step(model, data):
    """
    合并相同操作类型的步骤
    :param model:
    :param data:
    :return:
    """
    for i in data['true']:
        new_step = step(model['步骤'], i['步骤'], data['full_step'])
        i['步骤'] = new_step
    for i in data['false']:
        new_step = step(model['步骤'], i['步骤'], data['full_step'])
        i['步骤'] = new_step
